#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>

void printArray(int* pa, int sz) 
{
	for (int i = 0; i < sz; i++)
	{
		printf("%d ", *(pa+i));
	}
	printf("\n");
	// printf("*pa = %d\n", *pa);
}

size_t myStrlen(char* p)
{
	char* q = p;
	while (*q != '\0')
	{
		q++;
	}

	return q - p;
}

int main()
{
	//int a = 10;
	//// printf("%p\n", &a);
	//int* p = &a;
	////*p = 0;
	//char* pc = (char*)&a;
	//// *pc = 0;

	///*printf("&a = %p\n", &a);
	//printf("p = %p\n", p);
	//printf("p + 1 = %p\n", p + 1);
	//printf("pc = %p\n", pc);
	//printf("pc + 1 = %p\n", pc + 1);*/
	//
	//void* pa = &a;
	//// pa += 1; //err
	//// *pa = 20; //err
	//printf("%d\n", a);


	//int arr[] = { 0,1,2,3,4,5,6,7,8,9,10 };
	//int sz = sizeof(arr) / sizeof(arr[0]);
	//int* p = arr;
	//printArray(p, sz);

	char p[100] = {0};
	getchar(p);
	size_t len = myStrlen(p);
	printf("len = %zd\n", len);

	//int arr1[] = { 0,1,2,3,4,5,6,7,8,9,10 };
	//int sz1 = sizeof(arr1) / sizeof(arr1[0]);
	//int* pa = arr1;
	//while (pa < sz1 + arr1)
	//{
	//	printf("%d ", *pa);
	//	pa++;
	//}
	//
	//return 0;
}